home *** CD-ROM | disk | FTP | other *** search
- /* SOUNDER Library Function Copyright 1991 by Chuck Steenburgh */
- /* This function sounds a random series of 1-3 tones. The number
- of tones actually sounded is returned. */
-
- #include <bios.h>
- #include <stdio.h>
-
- int sounder()
-
- {
- /* Local variables */
- int number, freq[3], counter, length;
-
- srand(51);
- number = (rand() % 3);
- length = 12 / (number +1);
- for (counter = 0; counter <= number; counter++){
- freq[counter] = 110 + (110 * (rand() % 10));
- sound(freq[counter], length);
- }
- return(number);
- }
-